using System;
using System.Xml;

namespace umlungu.engineX.webX.thoughts.Admin.service {
	/// <summary>
	/// umlungu engineX web framework, handlerX class.
	/// </summary>
	public class Blogspace : SoapX
	{
		/// <summary>Constructor</summary>
		public Blogspace() : base("service", "Blogspace") {
		}
		/// <summary>
		/// Method _Process:: calls delegate(s)
		/// </summary>
		protected override void _Process(XmlDocument xmldom, profileX profile, contentX content) {
			_Debug("Blogspace._Process", "profile:", profile.Xml.InnerXml);
			_Debug("Blogspace._Process", "content:", content.Xml.InnerXml);
			_Debug("Blogspace._Process", "xmldom:", xmldom.OuterXml);
			switch (Process) {
				case "GetBlogspaceList":	ProcessResult(new ProcessServiceResult(Handlers.processGetBlogspaceList));		break;
				case "AddSpace":			ProcessResult(new ProcessServiceResult(Handlers.processAddSpace));				break;
				case "DeleteSpace":			ProcessResult(new ProcessServiceResult(Handlers.processDeleteSpace));			break;
				case "EditSpace":			ProcessResult(new ProcessServiceResult(Handlers.processEditSpace));				break;
				case "UpdateSpace":			ProcessResult(new ProcessServiceResult(Handlers.processUpdateSpace));			break;
				case "GetBlogspace":		ProcessResult(new ProcessServiceResult(Handlers.processGetBlogspace));			break;
				case "SetBlogspace":		ProcessResult(new ProcessServiceResult(Handlers.processSetBlogspace));			break;
				case "GetBlogspaceArch":	ProcessResult(new ProcessServiceResult(Handlers.processGetBlogspaceArch));		break;
				case "GetBlogspaceDel":		ProcessResult(new ProcessServiceResult(Handlers.processGetBlogspaceDel));		break;
				case "GetBlogspaceEdit":	ProcessResult(new ProcessServiceResult(Handlers.processGetBlogspaceEdit));		break;
				case "GetBlogspaceView":	ProcessResult(new ProcessServiceResult(Handlers.processGetBlogspaceView));		break;
				case "GetBlogspaceBlog":	ProcessResult(new ProcessServiceResult(Handlers.processGetBlogspaceBlog));		break;
				case "GetBlogspaceImage":	ProcessResult(new ProcessServiceResult(Handlers.processGetBlogspaceImage));		break;
				case "AddBlogspaceImage":	ProcessResult(new ProcessServiceResult(Handlers.processAddBlogspaceImage));	
											SubDir = profile.GetProfileValue("id");
											ProcessResult(new ProcessServiceResult(_ProcessImage));							break;
				case "AddSpaceImage":		ProcessResult(new ProcessServiceResult(Handlers.processAddBlogspaceImage));	
											SubDir = profile.GetProfileValue("BlogSpaces");
											ProcessResult(new ProcessServiceResult(_ProcessImage));							break;
				case "UploadNews":			ProcessResult(new ProcessServiceResult(Handlers.processUploadNews));	
											SubDir = "newsletters";
											ProcessResult(new ProcessServiceResult(_ProcessDocument));						break;
				case "SendNews":			ProcessResult(new ProcessServiceResult(Handlers.processSendNews));				break;
				case "ChangeArchive":		ProcessResult(new ProcessServiceResult(Handlers.processChangeArchive));			break;
				default:					ProcessResult(new ProcessServiceResult(Handlers.processServiceNoAction));		break;
			}
			_Debug("Blogspace._Process", "profile:", profile.Xmldoc.OuterXml);
		}
	}
}
		
